<template>
  <div class="app-container">
    <el-container>
      <el-aside width="width: 30rem;">
        <br />
        <el-form label-width="120px">
          <el-form-item label="公告内容">
            <el-input type="textarea" style="width: 30rem;" :rows="10" v-model="content"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="onSubmit" size="mini">发送</el-button>
          </el-form-item>
        </el-form>
      </el-aside>
      <el-main>
        <notice-view />
      </el-main>
    </el-container>
  </div>
</template>

<script>
  import NoticeView from '../tables/viewmodules/notice'

  import { addNotice } from '@/api/notice'

  export default {
    name: 'notice',
    components: {
      NoticeView
    },
    data() {
      return {
        content: "",
        tableData: []
      }
    },
    methods: {
      onSubmit() {
        addNotice({"content":this.content}).then(res=>{
          console.log(res);
        }).catch();
      }
    }
  }
</script>

<style>
</style>
